package org.shangrila.comm.theme;

import java.io.Serializable;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class ThemeSwitcherBean implements Serializable {

	private static final long serialVersionUID = 1L;
	private String theme = "bluesky";//aristo  bluesky bootstrap omega(pf6.2)
	private List<Theme> themes;

	@ManagedProperty("#{themeService}")
	private ThemeService service;

	@PostConstruct
	public void init() {
		this.themes = this.service.getThemes();
	}

	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}
	
	public List<Theme> getThemes() {
		return this.themes;
	}

	public void setService(ThemeService service) {
		this.service = service;
	}

}